import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;


public class EventsView extends JTable {
	private String hours[];
	EventsView (int col, int rows)
	{
		super(col,rows);
		hours = new String [48];
		for (int h=0,j=0 ; h<24 ; h++,j+=2)
		{
			hours[j]=String.valueOf(h);
			hours[j+1]=String.valueOf(h)+":30";
		}
	}
	public void setModel (DefaultTableModel model)
	{
		model.addColumn("Czas", hours);
		super.setModel(model);
		this.moveColumn(model.getColumnCount()-1, 0);
		this.getColumnModel().getColumn(0).setMaxWidth(50);
	}

}
